import Vue from 'vue'
import Router from 'vue-router'
import index from '@/view/common/index.vue'
import add from '@/view/user/add.vue'
import show from '@/view/common/show.vue'
import userList from '@/view/user/userList.vue'
import updateUser from '@/view/user/update.vue'
import permission from '@/view/permission/permissionList.vue'
import addOrUpdateP from '@/view/permission/addOrUpdateP.vue'
import roleList from '@/view/role/roleList.vue'
import addOrUpdateRole from '@/view/role/addOrUpdateRole.vue';
import showRoleUser from '@/view/auto/showRoleUser.vue';

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: index
    },
    {
      path: '/toShow',
      component: show
    },
    {
      path: '/toadd',
      component: add
    },
    {
      path: '/toUserList',
      component: userList
    },
    {
      path: '/toUpdateUser/:id',
      component: updateUser
    },
    {
      path: '/toPermissionList',
      component: permission
    },
    {
      path: '/toAddOrUpdateP',
      component: addOrUpdateP
    },
    {
      path: '/toAddOrUpdateP/:id',
      component: addOrUpdateP
    },
    {
      path: "/toRoleList",
      component: roleList
    },
{path:"/toAddOrUpdateRole",
component:addOrUpdateRole
},
{
  path:"/toAddOrUpdateRole/:id",
  component:addOrUpdateRole
},
{
  path:"/toShowRoleUser/:id",
  component:showRoleUser
}
  ]
})
